package com.hh.bss.common;

import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class ArrayObjectRowMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int row) throws SQLException{
		ResultSetMetaData rsmd = rs.getMetaData();
		int columnCount = rsmd.getColumnCount();
		Object[] results = new Object[columnCount];
		for (int i = 1; i <= columnCount; i++){
			results[i - 1] = rs.getObject(i);
		}
		return results;
	}
}
